import { localStg } from '@/utils/storage';
import { request } from '../request';

export async function fetchGetCsrf() {
  const { error, data } = await request({
    url: '/csrftoken',
    method: 'get'
  });

  if (error) {
    console.log('获取csrf请求失败', error);
  }

  localStg.set('csrf', data.token);
  console.log('设置csrftoken成功', data);
}
